/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Server;

import java.awt.event.*;

/**
 *
 * @author Samuel
 */
public class StartServerButton implements ActionListener {
        public void actionPerformed(ActionEvent e) {
            if (!ServerGUI.isRunning()) {
                ServerGUI.setRunning(true);
                try {
                    FlightServer server = new FlightServer();
                    server.start();
                    ServerGUI.appendText("Server Started\n");
                } catch (Exception ea) {
                }
            } else {
                ServerGUI.appendText("There is already a server instance running\n");
            }
        }
    }
